<?php
/**
 * Store Factory 
 * @author Kirill Egorov 2010
 *
 */
class Store{

   const Local = 0;
   const Session = 1;
    
   /**
    * Store factory
    * @param int $type
    * @param string $name
    * @return Store_Interface
    */
   static public function factory($type , $name = 'default'){
       switch($type){
           case self::Local : return Store_Local::getInstance($name);
               break;
           case self::Session : return Store_Session::getInstance($name);
               break;        
       }
   }
}